/**
 * ReportGear(2011)
 */
package net.abbp.report.view.cell.painter;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Rectangle;


import net.abbp.core.util.StringUtils;
import net.abbp.report.model.Cell;

/**
 * 默认单元格绘制器,绘制文本
 * 
 * @version 1.0 2011-3-26
 * @author <a herf="lexloo@gmail.com">lexloo</a>
 * @since Report 1.0
 */
public class DefaultCellPainter implements ICellPainter {

    @Override
    public void paint(Graphics g, Rectangle rect, Cell cell) {
        CellPaintUtils.paintCellStyleString((Graphics2D) g, rect, StringUtils.convertToString(cell.getValue(), ""),
                cell.getStyle());
    }

}
